package timing.ukulele.third.controller.msg;

import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import timing.ukulele.common.data.ResponseData;
import timing.ukulele.data.third.data.msg.SendMessageDTO;
import timing.ukulele.third.service.msg.SendMessageService;

/**
 * 发送消息Controller
 *
 * @author zh
 */
@Slf4j
@RequestMapping("/msg/message")
@RestController
@AllArgsConstructor
public class SendMessageController {

    private final SendMessageService sendMessageService;

    /**
     * /msg/send/sendMessage
     */
    @Operation(summary = "发送消息（单模版）")
    public ResponseData<Boolean> sendMessage(@RequestBody SendMessageDTO dto) {
        sendMessageService.sendMessageByBusiness(dto);
        return ResponseData.success();
    }

}

